#ifndef VROUTE_TOOLS_HPP_3
#define VROUTE_TOOLS_HPP_3

#include <stdio.h>

namespace vroute_stack
{
    extern bool vroute_IsBigEndin;
    typedef enum _dumpFormat
    {
        dumpFormat_chars,
        dumpFormat_bytes,
        dumpFormat_charsBytes,
    }dumpFormat;

    typedef enum _FileType
    {
        fileType_log,
        fileType_normal,
    }FileType;

    class CTools
    {
    public:
        static int init();
        static bool IsBigEdian();
        
        static int dumpToFile(FILE* hout, char* buffer, int len, dumpFormat format);
        static int dumpToFileCharsOrBytes(FILE* hout, char* buffer, int len, dumpFormat dformat); 
        static int dumpToFileCharsBytes(FILE* hout, char* buffer, int len);
        static FILE* getAFilep(char* p, FileType fp);

        static void swipBytes(unsigned char* src, unsigned char* dst, int len);

        static unsigned int getARandom();

        static void fillArrayRadom(unsigned char* buffer, int len);

        static void getTimeStr(char* buffer, int len);

        static unsigned long getCompAddr(char* addr);
    };
}
#endif //VROUTE_TOOLS_HPP_3